setDimens

open fun setDimens(left: Int, top: Int, scrollX: Int, scrollY: Int, width: Int, height: Int)(source)

Set the basic dimensions of this view.

Parameters

left

The view's left position, in pixels relative to its parent's left edge.

top

The view's top position, in pixels relative to its parent's top edge.

scrollX

How much the view's x coordinate space has been scrolled, in pixels.

scrollY

How much the view's y coordinate space has been scrolled, in pixels.

width

The view's visible width, in pixels. This is the width visible on screen, not the total data width of a scrollable view.

height

The view's visible height, in pixels. This is the height visible on screen, not the total data height of a scrollable view. Compatibility behavior:

  • SDK 23 and above, this method matches platform behavior.
  • SDK 22 and below, this method does nothing.